package com.cykj.service.serviceImpl;

import com.cykj.Mapper.projectContentMapper;
import com.cykj.Mapper.selectAllprojectMapper;
import com.cykj.pojo.AllMaxContext;
import com.cykj.pojo.Order1;
import com.cykj.pojo.Project;
import com.cykj.service.projectService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class projectServiceimpl implements projectService {
    @Autowired
    private selectAllprojectMapper selectAllprojectMapper;
    @Autowired
    private projectContentMapper projectContentMapper;
     @Override
    public List<Project> projectAll() {
        List<Project> projects = selectAllprojectMapper.projectAll();
        return projects;
    }

    @Override
    public List<Package> packageAll() {
        List<Package> packages = selectAllprojectMapper.packageAll();
        return  packages;

    }

    @Override
    public List<Project> selectByuserId(int userId,String number) {
        List<Project> projects = selectAllprojectMapper.selectByuserId(userId,number);
        return projects;
    }

    @Override
    public AllMaxContext allMax(int orderId) {
        AllMaxContext allMaxContext = projectContentMapper.allMax(orderId);
        return allMaxContext;
    }

    @Override
    public List<Order1> selectOrderId(String number) {
        List<Order1> order1 = selectAllprojectMapper.selectOrderId(number);
        return order1;
    }
}
